package com.noocodecommit.wicket.jquery.plugin.ui.accordion;

import com.noocodecommit.wicket.jquery.TemplatePage;
import com.noocodecommit.wicket.stuff.jquery.JQCore;
import com.noocodecommit.wicket.stuff.jquery.plugin.chili.JQChili;
import com.noocodecommit.wicket.stuff.jquery.plugin.ui.accordion.JQAccordion;
import com.noocodecommit.wicket.stuff.jquery.plugin.ui.tabs.JQTabs;

public class AccordionPage extends TemplatePage
{
	private final JQTabs tabContainer;
	
	public AccordionPage()
	{
		super();
		this.setupChili();
		
		tabContainer = new JQTabs("tab-container");
		tabContainer.setOutputMarkupId(true);
		add(tabContainer);
		
		/********************
		 * Simple Accordion
		 ********************/
		JQAccordion accordion0 = new JQAccordion("accordion0");
		accordion0.setOutputMarkupId(true);
		tabContainer.add(accordion0);
		
		/********************
		 * Chili code
		 ********************/
		JQChili chili1 = new JQChili("chili1");
		add(chili1);
		this.bindChiliCode(chili1, this.getClass(), "html");

		JQChili chili2 = new JQChili("chili2");
		add(chili2);
		this.bindChiliCode(chili2, this.getClass(), "java");
		
		JQCore.get().bindOnDocumentReadyFunction();
	}
}